package lab03.Test03;

import lab03.Test01.FileOutputStreamTest;

import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;

/**
 * Created by lenovo on 2017/11/16.
 */
public class Test {
    public static void main(String[] args) {
        String path="E:\\test.txt";
        FileOutputStream fileOutputStream=null;
        try {

             fileOutputStream=new FileOutputStream(path);
            try {
                fileOutputStream.write("beijing欢迎你！".getBytes());
            } catch (IOException e) {
                e.printStackTrace();
            }

        } catch (FileNotFoundException e) {
            e.printStackTrace();
        } finally {
            try {
                fileOutputStream.close();
            } catch (IOException e) {
                e.printStackTrace();
            }
        }
    }
}
